import { IToolTip } from "../../../../../com/mui/manager/IToolTip";
import { GameDefConfig } from "../../../resource/GameDefConfig";
import { Language } from "../../../../../extend/language/Language";
import { ObjCreate } from "../../common/ObjCreate";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { ResouceConst } from "../../../../component/gconst/ResouceConst";
import { Vector } from "../../../../../__AS3__/vec/Vector";
//class IntimateDescription
    
    export  class IntimateDescription /* flash.display.Sprite */ implements IToolTip
    {
        constructor()
        {
            
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            var loc2=0;
            var loc6=null;
            var loc7=null;
            var loc8=null;
            var loc9=null;
            var loc10=null;
            var loc11=null;
            var loc1=GameDefConfig.instance.getIntimateList();
            if (!IntimateDescription.vcIntimate) 
            {
                IntimateDescription.vcIntimate = new Vector.<String>();
                loc2 = 0;
                while (loc2 < loc1.length) 
                {
                    if (loc2 != 0) 
                    {
                        if (loc2 != (loc1.length - 1)) 
                        {
                            IntimateDescription.vcIntimate.push(loc1[(loc2 - 1)] + "-" + (loc1[loc2] - 1));
                        }
                        else 
                        {
                            IntimateDescription.vcIntimate.push(loc1[(loc2 - 1)] + Language.getString(40350));
                        }
                    }
                    else 
                    {
                        IntimateDescription.vcIntimate.push("0-" + (loc1[loc2] - 1));
                    }
                    ++loc2;
                }
            }
            ObjCreate.createBg(0, 0, 285, 364, this, "ToolTipBg");
            var loc3=ObjCreate.createGButton("", 258, 7, 19, 19, this, "CloseButton");
            loc3.addEventListener(flash.events.MouseEvent.CLICK, this.hideThis);
            this._title = GlobalClass.getBitmap(ImagesConst.IntimateDescription);
            this._title.x = 70;
            this._title.y = 4;
            this.addChild(this._title);
            ObjCreate.createBg(8, 35, 272, 232, this, "DisabledBg");
            loc2 = 0;
            while (loc2 < IntimateDescription.vcIntimate.length) 
            {
                (loc6 = new Object /* flash.display.Sprite */()).x = 10;
                loc6.y = 40 + loc2 * 23;
                this.addChild(loc6);
                loc7 = ObjCreate.createTextField("【" + GameDefConfig.instance.getIntimateNameById(loc2 + 1) + "】", 0, 0, 75, 20, loc6, GlobalStyle.textFormat2);
                (loc8 = GlobalClass.getBitmap(ImagesConst.HeartShapedSingle)).x = 80;
                loc8.y = 2;
                loc6.addChild(loc8);
                loc9 = ObjCreate.createTextField(IntimateDescription.vcIntimate[loc2], 105, 0, 85, 20, loc6);
                loc10 = ObjCreate.createTextField(vcBoot[loc2], 185, 0, 90, 20, loc6, GlobalStyle.textFormat8);
                (loc11 = ResouceConst.getScaleBitmap("SplitLine")).x = 10;
                loc11.y = 17;
                loc11.width = 254;
                loc6.addChild(loc11);
                ++loc2;
            }
            var loc4=ObjCreate.createTextField("", 10, 272, 267, 54, this);
            var loc5=ObjCreate.createTextField("", 10, 326, 267, 40, this);
            loc4.multiline = true;
            loc4.wordWrap = true;
            loc5.multiline = true;
            loc5.wordWrap = true;
            loc4.htmlText = "<textFormat leading=\'4\'>" + Language.getString(40351) + "</textFormat>";
            loc5.htmlText = "<textFormat leading=\'4\'>" + Language.getString(40352) + "</textFormat>";
            return;
        }

        /* internal  */hideThis(arg1: Object /* flash.events.MouseEvent */): void
        {
            this.visible = false;
            return;
        }

        public set data(arg1)
        {
            return;
        }

        /* internal  */static get vcBoot(): Vector.<String>
        {
            return Vector.<String>([Language.getString(40344), Language.getString(40345), Language.getString(40346), Language.getString(40347), Language.getString(40348), Language.getString(40349), Language.getString(40411), Language.getString(40412), Language.getString(40413), Language.getString(40414)]);
        }

        /* internal */ /* var */_title: Object /* flash.display.Bitmap */;

        /* internal */ static /* var */vcIntimate: Vector.<String>;
    }
